home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / strlib.zip / STRCPY.C < prev    next >
Text File  |  1993-01-04  |  640b  |  24 lines

  1.  
  2. /*  File   : strcpy.c
  3.     Author : Richard A. O'Keefe.
  4.     Updated: 20 April 1984
  5.     Defines: strcpy()
  6.  
  7.     strcpy(dst, src) copies all the characters  of  src  (including  the
  8.     closing  NUL)  to dst, and returns the old value of dst.  Maybe this
  9.     is useful for doing i = strlen(strcpy(dst, src)); I've always  found
  10.     strmov handier.
  11. */
  12.  
  13. #include "strings.h"
  14.  
  15. char *strcpy(dst, src)
  16.     register char *dst, *src;
  17.     {
  18.         char *save;
  19.  
  20.         for (save = dst; *dst++ = *src++; ) ;
  21.         return save;
  22.     }
  23.  
  24.